package com.ys.enume.mail;

public class MailEnum {
	
	public enum Type {
		INBOX("普通", "inbox"), DRAFT("草稿箱", "draft"), OUTBOX("发件箱", "outbox"), DUSTBIN("垃圾箱", "dustbin");
		public String name;
		public String value;

		private Type(String name, String value) {
			this.name = name;
			this.value = value;
		}
		
		public static boolean checkIn(String value) {
			if (value == null) {
				return false;
			} else {
				for (Type e : Type.values()) {
					if (value.equals(e.value)) {
						return true;
					}
				}
			}
			return false;
		}
	}
}
